﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security;

namespace Dimeng.ArdisPostProcessor.HomagLC4
{
    public class BitConverter
    {
        public static unsafe byte[] GetBytes(long o)
        {
            byte[] buffer = new byte[8];
            fixed (byte* numRef = buffer)
            {
                *((long*)numRef) = o;
            }
            return buffer;
        }

        internal static unsafe byte[] GetBytes(double d)
        {
            return GetBytes(*((long*)&d));
        }
    }
}
